# Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.

def build(bld):

	# Python 2.7 dynamic library
	bld.CreateDynamicModule(
		target    = 'python27',
		vs_filter = 'Libs',
		file_list = 'python.waf_files',
		exclude_from_static_code_analyzer = True,
		cflags    = [
			# No warnings in 3rdParty code, we can't fix them anyway
			'/W0',

			# Force all files to pull in the customized pyconfig.h in Libs/python.
			# Because python uses #include "" instead of #include <>, we MUST do this, or source files will prefer the pyconfig in the same directory.
			# This is the case in the PC subfolder, for example.
			'/FI' + Path('Code/Libs/python/pyconfig.h'),
		],
		includes  = [
			Path('Code/SDKs/Python27/Include'),
			Path('Code/SDKs/Python27/PC'),
			Path('Code/SDKs/Python27/Python'),
		],
		winres_includes = [
			Path('Code/Libs/python'), # For pythonnt_rc.h
		],
		defines   = [
			'Py_BUILD_CORE', # Building python
		],
		use_module = [
			'expat',
			'zlib',
		],
		lib = [
			'shell32',
		],
	)
